package com.example.apartment.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * 学生信息实体类
 *
 * @author wuzexin
 * @date 2021/10/28 14:17
 */
public class Student {

    // 主键
    @TableId(type = IdType.AUTO)
    private Integer id;
    // 学号
    private String sid;
    // 姓名
    private String name;
    // 性别 0-男生，1-女生
    private int sex;
    // 民族
    private String nation;
    // 专业
    private String major;
    // 班级 （class冲突了，只能用classroom代替）
    private String classroom;
    // 手机号码
    private String cellphone;
    // 宿舍楼id
    @TableField(updateStrategy  = FieldStrategy.IGNORED)
    private Integer buildingId;
    // 寝室号id
    @TableField(updateStrategy  = FieldStrategy.IGNORED)
    private Integer roomId;
    // 床号id
    @TableField(updateStrategy  = FieldStrategy.IGNORED)
    private Integer bedId;
    // 密码
    private String password;

    // 宿舍楼名字
    @TableField(exist = false)
    private String buildingName;
    // 宿舍房间号
    @TableField(exist = false)
    private Integer roomNum;
    // 宿舍床位号
    @TableField(exist = false)
    private Integer bedNum;

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    public Integer getRoomNum() {
        return roomNum;
    }

    public void setRoomNum(Integer roomNum) {
        this.roomNum = roomNum;
    }

    public Integer getBedNum() {
        return bedNum;
    }

    public void setBedNum(Integer bedNum) {
        this.bedNum = bedNum;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getClassroom() {
        return classroom;
    }

    public void setClassroom(String classroom) {
        this.classroom = classroom;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public Integer getBuildingId() {
        return buildingId;
    }

    public void setBuildingId(Integer buildingId) {
        this.buildingId = buildingId;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }



    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getBedId() {
        return bedId;
    }

    public void setBedId(Integer bedId) {
        this.bedId = bedId;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", sid='" + sid + '\'' +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", nation='" + nation + '\'' +
                ", major='" + major + '\'' +
                ", classroom='" + classroom + '\'' +
                ", cellphone='" + cellphone + '\'' +
                ", buildingId=" + buildingId +
                ", roomId=" + roomId +
                ", bedId=" + bedId +
                ", password='" + password + '\'' +
                ", buildingName='" + buildingName + '\'' +
                ", roomNum=" + roomNum +
                ", bedNum=" + bedNum +
                '}';
    }
}
